<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //arguments是一个伪数组1.具有数组的length属性2.按索引的方式进行存储
        function fn() {
            // console.log(arguments);//里面存储所有传递过来的参数 arguments = [1, 2, 3, 4, 5, 6]
            // return arguments
            //遍历arguments，输出arguments所有的元素
            for (i = 0; i < arguments.length; i++) {
                console.log(arguments[i]);
            }
        }
        fn(1, 2, 3, 4, 5, 6)
        
    </script>
</body>

</html>